package com.moinut.studentattendancemanager.model.dao.proxy;

import com.moinut.studentattendancemanager.model.dao.IFacultyDAO;
import com.moinut.studentattendancemanager.model.dao.impl.FacultyDAOImpl;

import java.util.List;

/**
 * @author MOILING
 */
public class FacultyDAOProxy extends BaseDAOProxy<FacultyDAOImpl> implements IFacultyDAO {
    @Override
    public List<String> getAllFacultyName() throws Exception {
        List<String> names = this.dao.getAllFacultyName();
        this.databaseConnection.close();
        return names;
    }

    @Override
    FacultyDAOImpl setDAOImpl() {
        return new FacultyDAOImpl(this.databaseConnection.getConnection());
    }
}
